package _15_generics._15_4.exercise;

import _15_generics._15_4.CountedObject;
import net.mindview.util.BasicGenerator;

/**
 * Modify BasicGeneratorDemo.java to use the
 * explicit form of creation for the Generator
 * (that is, use the explicit constructor instead
 * of the generic create() method )
 */
public class E14_BasicGeneratorDemo2 {
    public static void main(String[] args) {
        BasicGenerator<CountedObject> gen = new BasicGenerator<>(CountedObject.class);
        for (int i = 0; i < 4; i++){
            System.out.println(gen.next());
        }
    }
}
